package com.zyzd.general.module.recyclerview.textfragment;

import com.zyzd.general.entity.local.TextEntity;
import com.zyzd.general.model.TestModel;
import com.zyzd.retrofit.base.BaseRecyclerPresenter;

import java.util.ArrayList;

/**
 * Created by lzy on 2018/6/4 0004.
 * description ${文本列表 Presenter}
 */
class TextRecyclerPresenter extends BaseRecyclerPresenter<TextRecyclerContract.IView,TextEntity> implements TextRecyclerContract.IPresenter {

    private TestModel mModel;

    @Override
    public void loadData(boolean isRefresh) {
        ArrayList<TextEntity> textList = mModel.getTextList();
        mView.onLoadDataSuccess(isRefresh, textList);
    }

    @Override
    protected void createModel() {
        mModel = TestModel.getInstance();
    }
}
